﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;

namespace Model
{
    class AuktionTimer
    {
        Timer timer;
        Auktion auktion;

        public AuktionTimer(int time, int minut, Auktion auktion)
        {
            this.auktion = auktion;
            timer = new Timer(beregnTid(time, minut));
            timer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent);
            timer.AutoReset = false;
        }

        private long beregnTid(int time, int minut)
        {
            long millisekund = ((time * 3600) * 1000) + (minut * 60 * 1000);

            return millisekund;
        }

        private void OnTimedEvent(object source, ElapsedEventArgs e)
        {

        }
    }

}
